package com.ugoodtech.mdcc.core.repository;

import com.ugoodtech.mdcc.core.domain.Brand;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

public interface BrandRepository extends CrudRepository<Brand, Long>, QueryDslPredicateExecutor<Brand> {

    @Query("from Brand where brand_name=:name and deleted=false and enabled=true")
    Brand selectByName(@Param("name") String name);


    @Query("from Brand where brand_name in :name and deleted=false and enabled=true")
    List<Brand> selectByNameList(@Param("name") List<String> name);

}
